<%@ page import="cn.gudian.cms.sms.SmsClient" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>短信充值</title>
  <script>

    function check() {
      var m = document.getElementById("cardNum").value;
      var c = document.getElementById("cardNum").value;
      //验证是否为空
      if (m == "" || c == "") {
        alert("充值卡号或密码不能为空。");
        return false;
      }
    
      return true;

    }
   
  </script>
  <style type="text/css">
  <!--
  body {
    font-size: 12px;
    font-family: Arial, "宋体";
  }

  a {
    text-decoration: none;
    color: #000;
  }

  a:hover {
    color: #900;
    text-decoration: underline;
  }

  .text1 {
    font-weight: bold;
    font-size: 14px;
    color: #900;
  }

  .input1 {
    width: 400px;
  }

  textarea {
    width: 400px;
  }

  .red {
    color: #F00;
  }

  -->
  </style>
</head>

<body>
<g:form action="pressure" method="post" onSubmit="return check();">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="10" rowspan="4">&nbsp;</td>
              <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="40" colspan="2" valign="bottom" bgcolor="#FFFFF4"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="100" height="30" align="center" class="text1"><a href="/sms/send">发短信</a></td>
                      <td width="100" height="30" align="center" class="text1"><a href="/smsRecord/list">短信记录</a></td>
                      <td width="100" height="30" align="center" class="text1"><a href="/sms/pressure">短信充值</a></td>
                      <td>&nbsp;</td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td width="80" height="50">&nbsp;</td>
                  <td align="left" class="red">你当前的账户余额为：${SmsClient.getBalance()}元 　　　你单条短信的价格为：${SmsClient.getEachFee()}元</td>
                </tr>
              </table></td>
              <td width="10" rowspan="4">&nbsp;</td>
            </tr>
            <tr>
              <td height="10"></td>
            </tr>
            <tr>
              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="150" height="50">充值卡号：</td>
                  <td>
                  <input type="text" name="cardNum" id="cardNum" />
                </td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="150" height="50">充值卡密码：</td>
                  <td><input type="text" name="cardPassword" id="cardPassword" /></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="50" align="left" class="red">${flash.message}<input type="submit" name="button" id="button" value="确认并发送"/></td>
                </tr>
              </table></td>
              <td>&nbsp;</td>
            </tr>

          </table></td>

        </tr>
      </table></td>
    </tr>
  </table>
</g:form>
</body>
</html>
